﻿@model UserAgreementModel
@using Nop.Web.Models.Customer;
@{
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";
}
<script type="text/javascript">
    seajs.use("jquery", function ($) {

        $(function () {

            $("#agreement-agree").click(toggleContinueButton);

            toggleContinueButton();
        });

        function toggleContinueButton() {
            if ($('#agreement-agree').is(':checked')) {
                $('#continue-downloading').removeAttr('disabled');
            } else {
                $('#continue-downloading').attr('disabled', 'disabled');
            }
        }
    });
</script>
<div class="page user-agreement-page">
    <div class="page-title">
        <h1>@T("DownloadableProducts.UserAgreement")</h1>
    </div>
    <div class="page-body">
        @Html.Raw(Model.UserAgreementText)
        <div>
            <input id="agreement-agree" type="checkbox" value="@T("DownloadableProducts.IAgree")" />
        </div>
        <div>
            <input type="submit" id="continue-downloading" class="btn btn-default btn-xs user-agreement-button" value="@T("Common.Continue")" onclick="location.href='@Url.RouteUrl("GetDownload", new { orderItemId = Model.OrderItemGuid, agree = true })'" />
        </div>
    </div>
</div>
